//
//  BLTextField.m
//  百思不得姐
//
//  Created by hbl on 16/3/18.
//  Copyright © 2016年 hbl. All rights reserved.
//

#import "BLTextField.h"
#import <objc/runtime.h>
@implementation BLTextField

- (void)awakeFromNib
{
   [self setValue:[UIColor grayColor] forKeyPath:@"_placeholderLabel.textColor"];
}

- (BOOL)becomeFirstResponder
{
    [self setValue:self.textColor forKeyPath:@"_placeholderLabel.textColor"];
    return [super becomeFirstResponder];
}

- (BOOL)resignFirstResponder
{
    [self setValue:[UIColor grayColor] forKeyPath:@"_placeholderLabel.textColor"];
    return [super resignFirstResponder];
}

@end
